package com.agriculture.service;

import com.agriculture.domain.Order;
import com.agriculture.domain.Product;
import com.agriculture.domain.User;
import com.agriculture.dto.Order.OrderDTO;
import com.agriculture.dto.InventoryProductDTO;

import java.math.BigDecimal;
import java.util.List;

public interface DealerService {
    
    /**
     * 获取可购买农产品列表
     */
    List<Product> getPurchaseProducts(String search, String category, String supplier,
                                    BigDecimal minPrice, BigDecimal maxPrice,
                                    String sortBy, String sortOrder);
    
    /**
     * 获取农产品详情
     */
    Product getProductDetail(Long id);
    
    /**
     * 创建订单
     */
    Order createOrder(OrderDTO orderDTO) throws Exception;
    
    /**
     * 取消采购订单
     */
    void cancelPurchaseOrder(Long id, String reason) throws Exception;
    
    /**
     * 确认收货
     */
    void confirmReceipt(Long id) throws Exception;
    
    List<User> listDealers();
    
    Product createProduct(Long dealerId, Product product);
    
    void updateProductStatus(Long productId, String status);
    
    void deleteProduct(Long dealerId, Long productId);
    
    List<Product> getProducts(Long dealerId, String search, int page, int pageSize);
    
    /**
     * 获取可用于添加商品的库存列表
     */
    List<InventoryProductDTO> getInventoryProducts(String search, String category, 
        Long userId, int page, int pageSize);
} 